#ifndef _BT_TEXTURE_H_
#define _BT_TEXTURE_H_

/*
 * Texture
 * 
 * Simple, drawable wrapper for OpenGL texture
 */

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <GL/gl.h>
#include "filesystem.h"
#include "vector2f.h"

namespace bt
{
	class Texture
	{
	public:
		Texture();
		Texture(Texture& rhs);
		Texture(const char* filename);
		Texture(SDL_Surface* surf);
		
		// Assignment operators
		Texture& operator=(Texture& rhs);
		
		// Accessors
		GLuint getTexture();
		Vector2f getDimensions();
		
		// Mutators
		bool genTexture(const char* filename);
		bool genTexture(SDL_Surface* surf);
		
		// Actions
		void draw();	/* Draw textured quad without translation */
		void draw(float posx, float posy);
		void freeTexture();
		
	private:
		GLuint texture;
		Vector2f dimensions; /* width and height of quad */
	};
}

#endif /* _BT_TEXTURE_H_ */
